package com.code.day10.IOStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        method();
    }
    private static void method() throws IOException {
        try{
            FileInputStream fis = new FileInputStream("1.txt");
            int len = 0;
            while((len = fis.read()) != -1){
                System.out.println((char)len);
            }
            fis.read();
            fis.close();
        }catch (Exception e){
            System.out.println("File not found");
        }
    }
}

